home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / fgrep 1.1 / grep.Help < prev    next >
Encoding:
Text File  |  1993-03-10  |  1.1 KB  |  22 lines  |  [TEXT/MPS ]

  1. -
  2. Grep        # print lines matching a regular expression
  3. Grep [-CVbchilnsvwx] [-num] [-AB num] [[-e] expr|-f file] [files…]
  4.      -A num    # print <num> lines of context after every matching line
  5.      -B num    # print num lines of context before every matching line
  6.      -C        # print 2 lines of context on each side of every match
  7.      -num    # print num lines of context on each side of every match
  8.      -V        # print the version number on the diagnostic output
  9.      -b        # print every match preceded by its byte offset
  10.      -c        # print a total count of matching lines only
  11.      -e expr    # search for expr; useful if expr begins with -
  12.      -f file    # search for the expression contained in file
  13.      -h        # don't display filenames on matches
  14.      -i        # ignore case difference when comparing strings
  15.      -l        # list files containing matches only
  16.      -n        # print each match preceded by its line number
  17.      -s        # run silently producing no output except error messages
  18.      -v        # print only lines that contain no matches for the <expr>
  19.      -w        # print only lines where the match is a complete word
  20.      -x        # print only lines where the match is a whole line
  21.  
  22.